package com.ltx.mcpserver.config;

import com.ltx.mcpserver.service.CsdnService;
import com.ltx.mcpserver.service.WeatherService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 罗添煦
 * @description 服务注册器
 * @create 2025-04-22 下午12:36
 */
@Configuration
public class ProviderRegister {
    @Bean
    public ToolCallbackProvider weatherTools(WeatherService weatherService) {
        return  MethodToolCallbackProvider.builder().toolObjects(weatherService).build();
    }

    @Bean
    public ToolCallbackProvider csdnTools(CsdnService csdnService) {
        return  MethodToolCallbackProvider.builder().toolObjects(csdnService).build();
    }
}
